package com.rainsoftware.LicenseSystem.controllers.api;

import com.rainsoftware.LicenseSystem.services.ProductService;
import com.rainsoftware.LicenseSystem.services.UserInfoService;
import com.rainsoftware.LicenseSystem.utils.StandardResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/user")
public class UserController {

    @Autowired
    private UserInfoService userInfoService;

    @GetMapping("/info")
    public ResponseEntity<String> onGet() {
        StandardResponse response = userInfoService.getUserInfo();
        return response.build();
    }
}
